<?php  
if (!defined('BASEPATH')) exit('No direct script access allowed');

class Auth{
	public function __construct(){
		$CI =& get_instance();
		if($CI->router->class != 'user' && $CI->router->method != 'login'){
			if($CI->session->userdata('user_id') == '' || $CI->session->userdata('user_name') == ''){
				$CI->load->helper(array('url'));
				redirect('/useraz/login', 'location', 301);
			}
		}
	}
}